package org.chen.model.elastic;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.chen.model.mongodb.ArticleDocument;

import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ArticleSearchResult {
    private ArticleIndex article;  // 文章基本信息
    private Double score;  // 添加得分字段
    private Map<String, List<String>> highlights;  // 高亮片段

    public ArticleSearchResult(ArticleIndex article, Map<String, List<String>> highlights) {
        this.article = article;
        this.highlights = highlights;
    }
}
